<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    var list = new Array(100).fill(true);
    console.log(list);

    for (var i = 1; i <= 100; i++) {
        for (var j = 0; j < list.length; j++) { // 0-99
            if ((j + 1) % i == 0) {
                list[j] = !list[j];
            }
        }
    }
    console.log(list);

    var arr = [];
    list.forEach((item, index) => {
        if (!item) {
            arr.push(index + 1)
        }
    })
    console.log(arr);




</script>

</html>